#include "Renderer.h"
#include <iostream>

using namespace SolidityEngine;

Renderer::Renderer(RenderTarget target):
    Component(),
    _color(125,125,125),
    _index(0),
    _target(target)
{
}

Renderer::~Renderer(){}

void Renderer::SetPixel32(SDL_Surface *surface, int x, int y, Uint32 pixel)
{
    std::cout<<(int)surface->format->BytesPerPixel<<std::endl;
    //Uint32* target_pixel = (Uint32*)surface->pixels + y * surface->pitch/4 + x;
    Uint8* target_pixel = (Uint8*)surface->pixels + y * surface->pitch + x * 4;
     *(Uint32*) target_pixel = pixel;
}

void Renderer::_Render(SDL_Surface* surface)
{
        //Do Stuff!
}
